package StudyCode.summary.mydatetime;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class SimpleDateFormatCalendar {
	public static void main(String[] args) {
		Calendar calendar = Calendar.getInstance();

		SimpleDateFormat dateFormatter1 = new SimpleDateFormat("MMMMM dd yyyy");

		String result = null;
		result = dateFormatter1.format(calendar.getTime());
		System.out.println(result);

		dateFormatter1.applyPattern("MM/dd/YY hh:mm:ss");
		result = dateFormatter1.format(calendar.getTime());
		System.out.println(result);

		dateFormatter1.applyPattern("hh 'o''clock' a, zzzz");
		result = dateFormatter1.format(calendar.getTime());
		System.out.println(result);
	}
}
